All Functions of Week 5

aes

{GGPLOT2}

Construct aesthetic mapping of a ggplot graph

geom_point

{GGPLOT2}

Generates a scatter plot

bar

{base}

Used for annotations, such as “expression(paste(”-“,bar(y)))”

geom_segment

{GGPLOT2}

Generates a line segment or curve

theme

{GGPLOT2}

Set theme for GGPLOT2

c

{base}

Combine values/vectors into a vector

ylab

{GGPLOT2}

Label the y axis (ggplot)

sample_n

{dplyr}

Sample a number of observations from a data frame

scale_x_continuous

{GGPLOT2}

Customise continuous x axis

expression

{base}

Used in plots to add symbols to axes

dnorm

{stats}

Density distribution for the normal distribution

with

{base}

evaluate expression in the context of a data frame

subset

{base}

Return subsets of vectors, matrices or data frames which meet conditions.

xlab

{GGPLOT2}

Label the x axis (ggplot)

arrow

{GGPLOT2}

Draw an arrow in a ggplot graph

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

setwd

{base}

Set Working Directory

summary

{base}

Obtain summary statistics or detailed regression output

data.frame

{base}

Create a data.frame from vectors

read.csv

{utils}

Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters

library

{base}

Load an R package

element_blank

{GGPLOT2}

This theme element draws nothing, and assigns no space

geom_density

{GGPLOT2}

Generates a density plot

ifelse

{base}

Return a or b depending on the value of test

seq

{base}

Create a sequence

theme_classic

{GGPLOT2}

A minimalistic theme with no gridlines

element_text

{GGPLOT2}

Customise text in GGPLOT2

set.seed

{base}

Initialise a pseudorandom number generator.

ggplot

{GGPLOT2}

Create a ggplot graph

geom_ribbon

{GGPLOT2}

Generates an area plot

scale_y_continuous

{GGPLOT2}

Customise continuous y axis

The end!